<!DOCTYPE html>
<html>
<head><meta name="generator" content="Hexo 3.9.0">
    

    

    



    <meta charset="utf-8">
    
    
    <meta name="sogou_site_verification" content="true">
    
    
    
    <title>Lvshen&#39;s Blog | This is My World</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    
    <meta name="theme-color" content="#3F51B5">
    
    
    <meta name="keywords" content>
    <meta name="baidu-site-verification" content="VIVNdSiMZm">
    <meta name="description" content="学如逆水行舟，不进则退">
<meta property="og:type" content="website">
<meta property="og:title" content="Lvshen&#39;s Blog">
<meta property="og:url" content="https://lvshen9.gitee.io/page/3/index.html">
<meta property="og:site_name" content="Lvshen&#39;s Blog">
<meta property="og:description" content="学如逆水行舟，不进则退">
<meta property="og:locale" content="zh-CN">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="Lvshen&#39;s Blog">
<meta name="twitter:description" content="学如逆水行舟，不进则退">
    
    <link rel="shortcut icon" href="/img/mylogo.jpg">
    <link rel="stylesheet" href="//unpkg.com/hexo-theme-material-indigo@latest/css/style.css">
    <script>window.lazyScripts=[]</script>

    <!-- custom head -->
    

</head>

<body>
    <div id="loading" class="active"></div>

    <aside id="menu"  >
  <div class="inner flex-row-vertical">
    <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light" id="menu-off">
        <i class="icon icon-lg icon-close"></i>
    </a>
    <div class="brand-wrap" style="background-image:url(/img/brand.jpg)">
      <div class="brand">
        <a href="/" class="avatar waves-effect waves-circle waves-light">
          <img src="/img/avatar.jpg">
        </a>
        <hgroup class="introduce">
          <h5 class="nickname">我的技术小房间</h5>
          <a href="mailto:https://lvshen9.github.io" title="https://lvshen9.github.io" class="mail">https://lvshen9.github.io</a>
        </hgroup>
      </div>
    </div>
    <div class="scroll-wrap flex-col">
      <ul class="nav">
        
            <li class="waves-block waves-effect">
              <a href="/"  >
                <i class="icon icon-lg icon-home"></i>
                主页
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="/archives"  >
                <i class="icon icon-lg icon-archives"></i>
                Archives
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="/tags"  >
                <i class="icon icon-lg icon-tags"></i>
                Tags
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="/categories"  >
                <i class="icon icon-lg icon-th-list"></i>
                Categories
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="/about"  >
                <i class="icon icon-lg icon-address-book"></i>
                About
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="/collection"  >
                <i class="icon icon-lg icon-apple"></i>
                Collection
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="https://lvshen9.github.io/" target="_blank" >
                <i class="icon icon-lg icon-wordpress"></i>
                Blog
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="https://github.com/lvshen9" target="_blank" >
                <i class="icon icon-lg icon-github-alt"></i>
                GitHub
              </a>
            </li>
        
      </ul>
    </div>
  </div>
</aside>

    <main id="main">
        <header class="top-header" id="header">
    <div class="flex-row">
        <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light on" id="menu-toggle">
          <i class="icon icon-lg icon-navicon"></i>
        </a>
        <div class="flex-col header-title ellipsis">Lvshen&#39;s Blog</div>
        
        <div class="search-wrap" id="search-wrap">
            <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light" id="back">
                <i class="icon icon-lg icon-chevron-left"></i>
            </a>
            <input type="text" id="key" class="search-input" autocomplete="off" placeholder="输入感兴趣的关键字">
            <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light" id="search">
                <i class="icon icon-lg icon-search"></i>
            </a>
        </div>
        
        
        <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light" id="menuShare">
            <i class="icon icon-lg icon-share-alt"></i>
        </a>
        
    </div>
</header>
<header class="content-header index-header">

    <div class="container fade-scale">
        <h1 class="title">Lvshen&#39;s Blog</h1>
        <h5 class="subtitle">
            
                This is My World
            
        </h5>
    </div>

    


</header>

<div class="container body-wrap">

    <ul class="post-list">
    
        <li class="post-list-item fade">
            <article id="post-1"
  class="article-card article-type-post" itemprop="blogPost">

    <div class="post-meta">
        <time class="post-time" title="2019-01-21 16:34:54" datetime="2019-01-21T08:34:54.000Z"  itemprop="datePublished">2019-01-21</time>

        
	<ul class="article-category-list"><li class="article-category-list-item"><a class="article-category-list-link" href="/categories/工作/">工作</a></li></ul>



    </div>

    


  
    <h3 class="post-title" itemprop="name">
      <a class="post-title-link" href="/2019/01/21/1/">ELK之grok解析日志实战</a>
    </h3>
  




    <div class="post-content" id="post-content" itemprop="postContent">

    
        <h4 id="准备说明"><a href="#准备说明" class="headerlink" title="准备说明"></a>准备说明</h4><p>根据业务情况，会出现ELK解析多种格式的日志需求，这时需要在logstash的配置文件中配置grok规则解析日志文件，grok解析建议使用在线工具测试。</p>
<p>在线Grok解析工具地址：<a href="https://grokdebug.herokuapp.com/?#" target="_blank" rel="noopener">Grok Debugger</a></p>
<p>在线测试样例：</p>
<figure class="image-bubble">
                <div class="img-lightbox">
                    <div class="overlay"></div>
                    <img src="https://s2.ax1x.com/2019/01/21/kipFBj.png" alt="Grok Debugger" title>
                </div>
                <div class="image-caption">Grok Debugger</div>
            </figure>
    

        <a href="/2019/01/21/1/" class="post-more waves-effect waves-button">
            阅读全文…
        </a>
    </div>
    
    <div class="post-footer">
        
	<ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/ELK/">ELK</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/grok/">grok</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/logstash/">logstash</a></li></ul>

    </div>
    
</article>

        </li>
    
        <li class="post-list-item fade">
            <article id="post-1"
  class="article-card article-type-post" itemprop="blogPost">

    <div class="post-meta">
        <time class="post-time" title="2019-01-11 16:19:56" datetime="2019-01-11T08:19:56.000Z"  itemprop="datePublished">2019-01-11</time>

        
	<ul class="article-category-list"><li class="article-category-list-item"><a class="article-category-list-link" href="/categories/技术/">技术</a></li></ul>



    </div>

    


  
    <h3 class="post-title" itemprop="name">
      <a class="post-title-link" href="/2019/01/11/1/">我在github上面的一个项目————用Python爬取12306火车票</a>
    </h3>
  




    <div class="post-content" id="post-content" itemprop="postContent">

    
        <blockquote>
<p>github地址：<a href="https://github.com/lvshen9/Scrapy-Tickets-Python" target="_blank" rel="noopener">Scrapy-Tickets-Python</a></p>
</blockquote>
<h4 id="运行示例"><a href="#运行示例" class="headerlink" title="运行示例"></a>运行示例</h4><p>这是一个爬取火车票的python代码，先上效果图：</p>
<figure class="image-bubble">
                <div class="img-lightbox">
                    <div class="overlay"></div>
                    <img src="https://s2.ax1x.com/2019/01/17/kp1bXn.png" alt title>
                </div>
                <div class="image-caption"></div>
            </figure>
    

        <a href="/2019/01/11/1/" class="post-more waves-effect waves-button">
            阅读全文…
        </a>
    </div>
    
    <div class="post-footer">
        
	<ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/Python/">Python</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/github/">github</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/爬取/">爬取</a></li></ul>

    </div>
    
</article>

        </li>
    
        <li class="post-list-item fade">
            <article id="post-1"
  class="article-card article-type-post" itemprop="blogPost">

    <div class="post-meta">
        <time class="post-time" title="2019-01-10 19:33:45" datetime="2019-01-10T11:33:45.000Z"  itemprop="datePublished">2019-01-10</time>

        
	<ul class="article-category-list"><li class="article-category-list-item"><a class="article-category-list-link" href="/categories/技术/">技术</a></li></ul>



    </div>

    


  
    <h3 class="post-title" itemprop="name">
      <a class="post-title-link" href="/2019/01/10/1/">浅谈分布式消息技术 Kafka</a>
    </h3>
  




    <div class="post-content" id="post-content" itemprop="postContent">

    
        <figure class="image-bubble">
                <div class="img-lightbox">
                    <div class="overlay"></div>
                    <img src="http://misc.linkedkeeper.com/misc/img/blog/201707/linkedkeeper0_6f8d46d2-665d-4e28-80eb-2cf1e3fbc7e2.jpg" alt="This is kafka" title>
                </div>
                <div class="image-caption">This is kafka</div>
            </figure>  
<blockquote>
<p>本文转载自 <a href="linkedkeeper.com">浅谈分布式消息技术 Kafka</a></p>
</blockquote>
<h4 id="Kafka的基本介绍"><a href="#Kafka的基本介绍" class="headerlink" title="Kafka的基本介绍"></a>Kafka的基本介绍</h4><p>Kafka是最初由Linkedin公司开发，是一个分布式、分区的、多副本的、多订阅者，基于zookeeper协调的分布式日志系统（也可以当做MQ系统），常见可以用于web/nginx日志、访问日志，消息服务等等，Linkedin于2010年贡献给了Apache基金会并成为顶级开源项目。主要应用场景是：日志收集系统和消息系统。 Kafka主要设计目标如下：以时间复杂度为O(1)的方式提供消息持久化能力，即使对TB级以上数据也能保证常数时间的访问性能。 高吞吐率。即使在非常廉价的商用机器上也能做到单机支持每秒100K条消息的传输。支持Kafka Server间的消息分区，及分布式消费，同时保证每个partition内的消息顺序传输。同时支持离线数据处理和实时数据处理。 </p>
    

        <a href="/2019/01/10/1/" class="post-more waves-effect waves-button">
            阅读全文…
        </a>
    </div>
    
    <div class="post-footer">
        
	<ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/kafka/">kafka</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/分布式/">分布式</a></li></ul>

    </div>
    
</article>

        </li>
    
        <li class="post-list-item fade">
            <article id="post-Log4X统一日志平台部署记录"
  class="article-card article-type-post" itemprop="blogPost">

    <div class="post-meta">
        <time class="post-time" title="2018-11-28 11:40:59" datetime="2018-11-28T03:40:59.000Z"  itemprop="datePublished">2018-11-28</time>

        
	<ul class="article-category-list"><li class="article-category-list-item"><a class="article-category-list-link" href="/categories/工作/">工作</a></li></ul>



    </div>

    


  
    <h3 class="post-title" itemprop="name">
      <a class="post-title-link" href="/2018/11/28/Log4X统一日志平台部署记录/">Log4X统一日志平台部署记录</a>
    </h3>
  




    <div class="post-content" id="post-content" itemprop="postContent">

    
        <blockquote>
<p>author: made by lvshen</p>
</blockquote>
<h4 id="Log4X平台介绍"><a href="#Log4X平台介绍" class="headerlink" title="Log4X平台介绍"></a>Log4X平台介绍</h4><p>Log4X是负责实现日志采集、分析、展示的产品。针对分布式系统环境下的分散日志，进行记中存储、分析以及运用的日志管理平台。</p>
    

        <a href="/2018/11/28/Log4X统一日志平台部署记录/" class="post-more waves-effect waves-button">
            阅读全文…
        </a>
    </div>
    
    <div class="post-footer">
        
	<ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/Log4X/">Log4X</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/日志/">日志</a></li></ul>

    </div>
    
</article>

        </li>
    
        <li class="post-list-item fade">
            <article id="post-1"
  class="article-card article-type-post" itemprop="blogPost">

    <div class="post-meta">
        <time class="post-time" title="2018-09-05 10:57:07" datetime="2018-09-05T02:57:07.000Z"  itemprop="datePublished">2018-09-05</time>

        
	<ul class="article-category-list"><li class="article-category-list-item"><a class="article-category-list-link" href="/categories/技术/">技术</a></li></ul>



    </div>

    


  
    <h3 class="post-title" itemprop="name">
      <a class="post-title-link" href="/2018/09/05/1/">Redis3.0集群搭建</a>
    </h3>
  




    <div class="post-content" id="post-content" itemprop="postContent">

    
        <p>Redis3.0 及其之后的版本提供了<code>redis-cluster</code> 集群支持，用于在多个redis节点间共享数据，以提高服务的可用性。</p>
<p>构建 <em>redis-cluster</em> 集群可以通过 <em>redis-trib.rb</em> 工具来完成。<em>redis-trib.rb</em> 是redis官方提供的一个集群管理工具，集成在redis安装包的 <em>src</em> 目录下。<em>redis-trib.rb</em> 封装了redis提供的集群命令，使用简单、便捷。</p>
<p>因为 <em>redis-trib.rb</em> 是由ruby语言编写的，所以使用该工具需要ruby语言环境的支持。</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">$</span><span class="bash"> ruby -v</span></span><br><span class="line">ruby 2.3.1p112 (2016-04-26) [x86_64-linux-gnu]</span><br></pre></td></tr></table></figure>
    

        <a href="/2018/09/05/1/" class="post-more waves-effect waves-button">
            阅读全文…
        </a>
    </div>
    
    <div class="post-footer">
        
	<ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/Redis/">Redis</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/集群/">集群</a></li></ul>

    </div>
    
</article>

        </li>
    
        <li class="post-list-item fade">
            <article id="post-工作总结"
  class="article-card article-type-post" itemprop="blogPost">

    <div class="post-meta">
        <time class="post-time" title="2018-09-01 09:45:51" datetime="2018-09-01T01:45:51.000Z"  itemprop="datePublished">2018-09-01</time>

        
	<ul class="article-category-list"><li class="article-category-list-item"><a class="article-category-list-link" href="/categories/工作/">工作</a></li></ul>



    </div>

    


  
    <h3 class="post-title" itemprop="name">
      <a class="post-title-link" href="/2018/09/01/工作总结/">工作总结</a>
    </h3>
  




    <div class="post-content" id="post-content" itemprop="postContent">

    
        <h4 id="一、我的收获"><a href="#一、我的收获" class="headerlink" title="一、我的收获"></a>一、我的收获</h4><h5 id="部署CRM"><a href="#部署CRM" class="headerlink" title="部署CRM"></a>部署CRM</h5><p>这次有个比较大的收获就是自己部署CRM系统，CRM系统很复杂，光部署的用户就有10多个。这次的系统部署中，部署的用户有<code>deploy, web, app, cache, search, sec（权限缓存redis）, sna（Session缓存redis）,kafka, zk, proxy, nginx</code>。</p>
<p>要启动系统，这些都要启动。比如：不启动<code>nginx</code>。就获取不到静态资源，登陆的js就会报错，点击登录按钮没反应；没有启动proxy，CRM的页面就不能访问，这个代理程序可以配置端口；还有redis也需要启动，不然登陆出现错误；</p>
<p>其次学会了很多linux 命令操作，尤其是vi的操作。比如vi文件后，假如要删除里面某些内容，我以前通过退格键一个一个数据的删除，后来才知道 ：<code>dd --删除当前行</code>，<code>ndd --删除n行数据，dG --删除当前后之后的全部行</code>。<code>ESC+u --撤销操作</code>。</p>
    

        <a href="/2018/09/01/工作总结/" class="post-more waves-effect waves-button">
            阅读全文…
        </a>
    </div>
    
    <div class="post-footer">
        
	<ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/CRM/">CRM</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/Jstorm/">Jstorm</a></li></ul>

    </div>
    
</article>

        </li>
    
        <li class="post-list-item fade">
            <article id="post-1"
  class="article-card article-type-post" itemprop="blogPost">

    <div class="post-meta">
        <time class="post-time" title="2018-07-20 15:56:42" datetime="2018-07-20T07:56:42.000Z"  itemprop="datePublished">2018-07-20</time>

        
	<ul class="article-category-list"><li class="article-category-list-item"><a class="article-category-list-link" href="/categories/游戏/">游戏</a></li></ul>



    </div>

    


  
    <h3 class="post-title" itemprop="name">
      <a class="post-title-link" href="/2018/07/20/1/">我在GitHub上的一个关于Python版打飞机的项目</a>
    </h3>
  




    <div class="post-content" id="post-content" itemprop="postContent">

    
        <h4 id="PlaneWar简介"><a href="#PlaneWar简介" class="headerlink" title="PlaneWar简介"></a>PlaneWar简介</h4><p>a game-PlaneWar，Written by Python</p>
<p>这是一个用Python写的打飞机游戏，类似当年的微信打飞机。下面有相关的截图。其实代码也很简单，就是一些加载图片，游戏的逻辑处理，加载游戏音效。怎么个Python游戏用的核心库：<code>pygame</code>。以后打算用Java再写一个。里面的代码就不详细介绍了。有兴趣的可以访问我的GitHub项目。不过需要安装Python环境，最好是Python3环境。</p>
<blockquote>
<p>GitHub地址： <a href="https://github.com/lvshen9/PlaneWar" target="_blank" rel="noopener">Python版打飞机(飞机大战)</a></p>
</blockquote>
    

        <a href="/2018/07/20/1/" class="post-more waves-effect waves-button">
            阅读全文…
        </a>
    </div>
    
    <div class="post-footer">
        
	<ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/Github/">Github</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/Python/">Python</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/打飞机/">打飞机</a></li></ul>

    </div>
    
</article>

        </li>
    
        <li class="post-list-item fade">
            <article id="post-1"
  class="article-card article-type-post" itemprop="blogPost">

    <div class="post-meta">
        <time class="post-time" title="2018-07-06 14:45:41" datetime="2018-07-06T06:45:41.000Z"  itemprop="datePublished">2018-07-06</time>

        
	<ul class="article-category-list"><li class="article-category-list-item"><a class="article-category-list-link" href="/categories/技术/">技术</a></li></ul>



    </div>

    


  
    <h3 class="post-title" itemprop="name">
      <a class="post-title-link" href="/2018/07/06/1/">Git命令学习</a>
    </h3>
  




    <div class="post-content" id="post-content" itemprop="postContent">

    
        <h4 id="Git重要概念"><a href="#Git重要概念" class="headerlink" title="Git重要概念"></a>Git重要概念</h4><h5 id="master-head"><a href="#master-head" class="headerlink" title="master head"></a>master head</h5><p>每次提交，Git都把它们串成一条时间线，这条时间线就是一个分支。在Git里，有个分支叫主分支，即master分支。HEAD严格来说不是指向提交，而是指向master，master才是指向提交的，所以，HEAD指向的就是当前分支。</p>
<p>一开始的时候，master分支是一条线，Git用master指向最新的提交，再用HEAD指向master，就能确定当前分支，以及当前分支的提交点：</p>
<figure class="image-bubble">
                <div class="img-lightbox">
                    <div class="overlay"></div>
                    <img src="https://s2.ax1x.com/2019/01/17/kpljRH.png" alt title>
                </div>
                <div class="image-caption"></div>
            </figure>
    

        <a href="/2018/07/06/1/" class="post-more waves-effect waves-button">
            阅读全文…
        </a>
    </div>
    
    <div class="post-footer">
        
	<ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/Git/">Git</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/命令/">命令</a></li></ul>

    </div>
    
</article>

        </li>
    
        <li class="post-list-item fade">
            <article id="post-1"
  class="article-card article-type-post" itemprop="blogPost">

    <div class="post-meta">
        <time class="post-time" title="2018-07-05 20:06:10" datetime="2018-07-05T12:06:10.000Z"  itemprop="datePublished">2018-07-05</time>

        
	<ul class="article-category-list"><li class="article-category-list-item"><a class="article-category-list-link" href="/categories/技术/">技术</a></li></ul>



    </div>

    


  
    <h3 class="post-title" itemprop="name">
      <a class="post-title-link" href="/2018/07/05/1/">redis相关命令操作</a>
    </h3>
  




    <div class="post-content" id="post-content" itemprop="postContent">

    
        <h3 id="redis的启动方式"><a href="#redis的启动方式" class="headerlink" title="redis的启动方式"></a>redis的启动方式</h3><h4 id="直接启动"><a href="#直接启动" class="headerlink" title="直接启动"></a>直接启动</h4><p>  进入redis根目录，执行命令:</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">./redis-server &amp;</span><br></pre></td></tr></table></figure>
<p>加上‘&amp;’号使redis以后台程序方式运行</p>
    

        <a href="/2018/07/05/1/" class="post-more waves-effect waves-button">
            阅读全文…
        </a>
    </div>
    
    <div class="post-footer">
        
	<ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/redis/">redis</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/命令/">命令</a></li></ul>

    </div>
    
</article>

        </li>
    
        <li class="post-list-item fade">
            <article id="post-1"
  class="article-card article-type-post" itemprop="blogPost">

    <div class="post-meta">
        <time class="post-time" title="2018-05-30 17:37:25" datetime="2018-05-30T09:37:25.000Z"  itemprop="datePublished">2018-05-30</time>

        
	<ul class="article-category-list"><li class="article-category-list-item"><a class="article-category-list-link" href="/categories/技术/">技术</a></li></ul>



    </div>

    


  
    <h3 class="post-title" itemprop="name">
      <a class="post-title-link" href="/2018/05/30/1/">Windows端免密ssh登陆Linux服务器</a>
    </h3>
  




    <div class="post-content" id="post-content" itemprop="postContent">

    
        <h4 id="创建ssh信任关系"><a href="#创建ssh信任关系" class="headerlink" title="创建ssh信任关系"></a>创建ssh信任关系</h4><h5 id="copy公钥"><a href="#copy公钥" class="headerlink" title="copy公钥"></a>copy公钥</h5><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">#</span><span class="bash">在本地生成公钥和密钥：</span></span><br><span class="line">ssh-keygen -t rsa</span><br><span class="line"><span class="meta">#</span><span class="bash">将本机生成的公钥发送到服务器上（建立信任关系）：</span></span><br><span class="line">ssh-copy-id -i C:/Users/UserName/.ssh/id_rsa.pub root@server_ip       #UserName是电脑的用户名</span><br><span class="line"><span class="meta">#</span><span class="bash">测试ssh远程登录是否成功：</span></span><br><span class="line">ssh root@server_ip</span><br></pre></td></tr></table></figure>
    

        <a href="/2018/05/30/1/" class="post-more waves-effect waves-button">
            阅读全文…
        </a>
    </div>
    
    <div class="post-footer">
        
	<ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/Linux/">Linux</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/git/">git</a></li></ul>

    </div>
    
</article>

        </li>
    
    </ul>

    
<nav id="page-nav">
    <div class="inner">
    <a class="extend prev" rel="prev" href="/page/2/">上一页</a><a class="page-number" href="/">1</a><a class="page-number" href="/page/2/">2</a><span class="page-number current">3</span><a class="page-number" href="/page/4/">4</a><a class="page-number" href="/page/5/">5</a><span class="space">&hellip;</span><a class="page-number" href="/page/10/">10</a><a class="extend next" rel="next" href="/page/4/">下一页</a>
    </div>
</nav>


</div>

        <footer class="footer">
    <div class="top">
        
<p>
    <span id="busuanzi_container_site_uv" style='display:none'>
        站点总访客数：<span id="busuanzi_value_site_uv"></span>
    </span>
    <span id="busuanzi_container_site_pv" style='display:none'>
        站点总访问量：<span id="busuanzi_value_site_pv"></span>
    </span>
</p>


        <p>
            
            <span>博客内容遵循 <a rel="license" href="https://creativecommons.org/licenses/by-nc-sa/4.0/deed.zh">知识共享 署名 - 非商业性 - 相同方式共享 4.0 国际协议</a></span>
        </p>
    </div>
    <div class="bottom">
        <p><span>我的技术小房间 &copy; 2015 - 2020</span>
            <span>
                
                Power by <a href="http://hexo.io/" target="_blank">Hexo</a> Theme <a href="https://github.com/yscoder/hexo-theme-indigo" target="_blank">indigo</a>
            </span>
        </p>
    </div>
</footer>

    </main>
    <div class="mask" id="mask"></div>
<a href="javascript:;" id="gotop" class="waves-effect waves-circle waves-light"><span class="icon icon-lg icon-chevron-up"></span></a>



<div class="global-share" id="globalShare">
    <ul class="reset share-icons">
      <li>
        <a class="weibo share-sns" target="_blank" href="http://service.weibo.com/share/share.php?url=https://lvshen9.gitee.io/page/3/&title=Lvshen's Blog&pic=https://lvshen9.gitee.io/img/avatar.jpg" data-title="微博">
          <i class="icon icon-weibo"></i>
        </a>
      </li>
      <li>
        <a class="weixin share-sns wxFab" href="javascript:;" data-title="微信">
          <i class="icon icon-weixin"></i>
        </a>
      </li>
      <li>
        <a class="qq share-sns" target="_blank" href="http://connect.qq.com/widget/shareqq/index.html?url=https://lvshen9.gitee.io/page/3/&title=Lvshen's Blog&source=学如逆水行舟，不进则退" data-title=" QQ">
          <i class="icon icon-qq"></i>
        </a>
      </li>
      <li>
        <a class="facebook share-sns" target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=https://lvshen9.gitee.io/page/3/" data-title=" Facebook">
          <i class="icon icon-facebook"></i>
        </a>
      </li>
      <li>
        <a class="twitter share-sns" target="_blank" href="https://twitter.com/intent/tweet?text=Lvshen's Blog&url=https://lvshen9.gitee.io/page/3/&via=https://lvshen9.gitee.io" data-title=" Twitter">
          <i class="icon icon-twitter"></i>
        </a>
      </li>
      <li>
        <a class="google share-sns" target="_blank" href="https://plus.google.com/share?url=https://lvshen9.gitee.io/page/3/" data-title=" Google+">
          <i class="icon icon-google-plus"></i>
        </a>
      </li>
    </ul>
 </div>


<div class="page-modal wx-share" id="wxShare">
    <a class="close" href="javascript:;"><i class="icon icon-close"></i></a>
    <p>扫一扫，分享到微信</p>
    <img src="//api.qrserver.com/v1/create-qr-code/?data=https://lvshen9.gitee.io/page/3/" alt="微信分享二维码">
</div>




    <script src="//cdn.bootcss.com/node-waves/0.7.4/waves.min.js"></script>
<script>
var BLOG = { ROOT: '/', SHARE: true, REWARD: false };


</script>

<script src="//unpkg.com/hexo-theme-material-indigo@latest/js/main.min.js"></script>


<div class="search-panel" id="search-panel">
    <ul class="search-result" id="search-result"></ul>
</div>
<template id="search-tpl">
<li class="item">
    <a href="{path}" class="waves-block waves-effect">
        <div class="title ellipsis" title="{title}">{title}</div>
        <div class="flex-row flex-middle">
            <div class="tags ellipsis">
                {tags}
            </div>
            <time class="flex-col time">{date}</time>
        </div>
    </a>
</li>
</template>

<script src="//unpkg.com/hexo-theme-material-indigo@latest/js/search.min.js" async></script>






<script async src="//dn-lbstatics.qbox.me/busuanzi/2.3/busuanzi.pure.mini.js"></script>



<script>
(function() {
    var OriginTitile = document.title, titleTime;
    document.addEventListener('visibilitychange', function() {
        if (document.hidden) {
            document.title = '死鬼去哪里了！';
            clearTimeout(titleTime);
        } else {
            document.title = '(つェ⊂)咦!又好了!';
            titleTime = setTimeout(function() {
                document.title = OriginTitile;
            },2000);
        }
    });
})();
</script>



</body>
</html>
